package com.zycfc.zsf.boot.web.autoconfigure;

import org.springframework.boot.autoconfigure.jackson.*;
import org.springframework.http.converter.json.*;
import com.fasterxml.jackson.databind.deser.std.*;
import java.io.*;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
import org.springframework.context.annotation.*;

@Configuration
public class JacksonAutoConfig
{
    private static final String BLANK_STR = "";
    
    @Bean
    public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
        return (Jackson2ObjectMapperBuilderCustomizer)new Jackson2ObjectMapperBuilderCustomizer() {
            public void customize(final Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
                jacksonObjectMapperBuilder.deserializerByType((Class)String.class, (JsonDeserializer)new StringDeserializer() {
                    public String deserialize(final JsonParser p, final DeserializationContext ctxt) throws IOException {
                        final String deserialize = super.deserialize(p, ctxt);
                        return (deserialize != null && "".equals(deserialize)) ? null : deserialize;
                    }
                });
            }
        };
    }
}
